Pure Logic Program Compilation and Improvement (Optimization) Via Programmer-Controlled Transformations Fourth Generation Languages Done Right

نویسنده

  • Malcolm Mumme
چکیده

I describe a novel hybrid approach to efficient parallel implementation of declaratively (and formally) specified applications. My approach proposes novel languages that support formal refinement and parallel distributions. I defer the complexity of designing user-level programming language features in favor of designing intermediate languages with specific properties and sufficient generality. My primary high-level intermediate language (IL), RILL (Refinement-based Intermediate Logic Language), provides the generality of predicate logic for specification and supports arbitrarily powerful programmer-controlled optimizations, through formal refinement. My secondary IL, Ephemeral, supports low-level parallel processing across a wide variety of platform types. A programmer writes a formal specification in a syntactically pleasing ‘surface’ language, and invokes a surface language compiler, which translates the specification into RILL, and invokes my proposed system. My proposed system starts with the formal specification translated to a RILL program, optimizes this program via correctness preserving RILL-to-RILL code refinements, then translates the optimized code to Ephemeral, invoking the Ephemeral compiler for translation to specific platforms. My approach to compiling predicate logic programs in RILL is novel in the way it avoids the generally intractable problem of compiling declarative specifications. I take advantage of the fact that existing solutions to many computing problems can be construed as solutions of specific declarative specifications. I additionally exploit the wealth of existing decision procedures for many classes of problems, such as FOL, SAT, ILP, linear systems, etc., using them as bases for refinement methods. The most universally necessary refinement methods should occupy a ‘standard library’ of optimization procedures, leaving less universal and more advanced optimizations to extended libraries. RILL provides the novel Refine construct, which application programmers use to control the application of optimization refinements that transform their declarative specifications to a more executable and efficient form. When compositions of available refinements do not suffice to optimize a particular specification, the Refine construct also provides the means of applying custom optimizations, which may be constructed by the application programmer. Thus, the implementation of RILL is a step toward obtaining high application performance with a general purpose logic programming language. The proposed low-level parallel programming language, Ephemeral, mostly avoids architectural dependence by making only minimal assumptions about supported platforms. Ephemeral uniquely supports MIMD arrays with tiny individual processors, not having sufficient memory for the entire program, such as I expect will eventually dominate the high end of the MIMD performance spectrum. The possibility of high application performance is retained by allowing distribution, of both data and computation, to be specified in a somewhat topology dependent manner. The geometry of Ephemeral’s computational model is physics-based, ensuring performance metrics based on the model accurately bound communication performance of compiled code executing on parallel platforms. The resulting hybrid RILL/Ephemeral system will support the declarative specification and implementation of efficient parallel applications. Thus, this research moves toward positively answering the question: “Can we escape the Sequential Prison by programming in a general purpose declarative language?”.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Incremental Flow Analysis

interpretation is a technique for ow analysis widely used in the area of logic programming. Until now it has been used only for the global compilation of Prolog programs. But the programming language Prolog enables the programmer to change the program during run time using the built-in predicates assert and retract. To support the generation of eecient code for programs using these dynamic data...

متن کامل

Programming Data Structures in Logic

Current programming languages that are grounded in a formal logic — such as pure Lisp (based on the lambda calculus) and Prolog (based on Horn clause logic) — do not support the use of complex, pointer-based data structures. The lack of this important feature in logically grounded languages contrasts sharply with its strong support in the imperative programming languages that have enjoyed wide ...

متن کامل

Hierarchical Modularity and Intermodule Optimization

Separate compilation is an important tool for coping with design complexity in large software projects. When done right it can also be used to create software libraries, thus promoting code reuse. But separate compilation comes in various flavors and has many facets: namespace management, linking, optimization, dependencies. Many programming languages identify modular units with units of compil...

متن کامل

Code generation techniques for the task-parallel programming language Spar

In this paper we describe a compilation scheme to translate implicitly parallel programs in the programming language Spar (an extension to Java) to efficient code for distributed-memory parallel computer systems. The compilation scheme is formulated as a set of transformation rules. In Spar, the language constructs for parallelization have been designed for comfortable use by the programmer, no...

متن کامل

Lazy Evaluation: From natural semantics to a machine-checked compiler transformation

HIGH level programming languages, in particular the lazy, pure, functional kind, liberate the programmer from having to think about the low-level details of how his code is going to be executed, and they give the compiler extra leeway in optimising the program. This distance to the actual machine makes it harder to reason about the effect of the compiler’s transformations on the program’s perfo...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013